package com.gxa.retail_admin.controller;

import com.gxa.common.vo.JsonResult;
import com.gxa.common.vo.R;
import com.gxa.modules.service.CommodityService;
import com.gxa.modules.service.ValuecardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
//http://localhost:8080/swagger-ui.html
@Api(value = "运营商品中心储值卡管理数据test",tags = "运营商品中心储值卡管理数据接口API-王梓鑫")

@RequestMapping(value = "/operation/goods")
public class ValuecardController  {
    @Autowired(required = false)
    private ValuecardService valuecardService;
    JsonResult jsonResult = new JsonResult();

    @RequestMapping(value = "/queryValuecardMap",method = RequestMethod.GET)
    @RequiresPermissions("商品管理")
    @ApiOperation(value = "储值卡管理数据查询接口",notes = "查询储值卡管理数据",httpMethod = "GET", response = R.class)

    @ApiResponses({
            @ApiResponse(code=200,message = "success"),
            @ApiResponse(code=404,message = "找不到页面，接口或参数错误"),
            @ApiResponse(code=500,message = "后台错误")
    })
    @ResponseBody

    public JsonResult queryValuecardMap(@RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer limit){

        jsonResult.setCode(200);

        return valuecardService.queryValuecardMap(page,limit);

    }

}
